<template>
	<view class="content">
		<!-- 头部 -->
		<yHeader :current="1" :screenWidth="screenWidth" @Tabs="handleTabs" @EditLogin="handleExit"></yHeader>
		<!-- PC内容 -->
		<view v-if="screenWidth > 480" class="bg-grey pt-4" style="width: 100%">
			<view class="__inner">
				<!-- 轮播图 -->
				<view class="flex justify-between">
					<view class="flex flex-column justify-between" style="width: 73.5%; height: 950rpx">
						<view style="height: 950rpx">
							<!-- <swiperDot v-if="swipers.length > 0" class="position-relative" :current="current"
								:info="swipers">
								<swiper :autoplay="true" :interval="3000" :duration="500" circular
									style="height: 950rpx" @change="changeIndicatorDots">
									<swiper-item @click="handleSkip(item.Group_Rotation_URL)"
										v-for="(item, index) in swipers" :key="index">
										<image :src="Domain_IMG + item.Picture_URL" mode="sapectFill"
											style="height: 950rpx; width: 100%"></image>
									</swiper-item>
								</swiper>
							</swiperDot> -->
							<swiperDot v-if="swipers.length > 0" class="position-relative" :current="current"
								:info="swipers">
								<swiper :autoplay="true" :interval="3000" :duration="500" circular
									style="height: 950rpx" @change="changeIndicatorDots">
									<swiper-item @click="handleSkip(item.Group_Rotation_URL)"
										v-for="(item, index) in swipers" :key="index">
										<image :src="'/static/imgTest/' + item.Picture_URL" mode="sapectFill"
											style="height: 950rpx; width: 100%"></image>
									</swiper-item>
								</swiper>
							</swiperDot>
						</view>
					</view>
					<view class="bg-white" style="width: 25%; height: 950rpx">
						<view class="flex flex-column" style="height: 35%">
							<view v-if="!isLogin" class="m-4" style="height: 100%">
								<view class="flex justify-center align-center" style="height: 55%">
									<text class="font">欢迎来到黑木耳产业互联网平台!</text>
								</view>
								<view class="flex align-end login-button"
									style="justify-content: space-around; height: 45%">
									<view @click="Login" class="flex justify-center align-center border-button"
										:class="'bg-' + ThemeColors + ' border-' + ThemeColors"
										style="cursor: pointer; width: 200rpx; height: 90%">
										<text class="text-white font">请登录</text>
									</view>
									<view class="hover flex justify-center align-center bg-white border-button"
										:class="'border-' + ThemeColors" style="width: 200rpx; height: 90%"
										@click="Register">
										<text class="font" :class="'text-' + ThemeColors">免费注册</text>
									</view>
								</view>
							</view>
							<view v-else class="m-4 flex align-center" style="height: 100%">
								<view class="flex-shrink rounded-circle justify-center align-center"
									style="width: 120rpx; height: 120rpx">
									<image src="@/static/icon/NoLogo.png" class="rounded-circle border-button"
										:class="'border-' + ThemeColors" style="width: 120rpx; height: 120rpx" mode="">
									</image>
								</view>
								<view class="flex px-2 flex-column justify-center" style="width: 100%; height: 100%">
									<view class="flex align-center" style="width: 390rpx; height: 50%">
										<text class="font-md text-ellipsis">Hi，{{ Name }}({{ Phone }})</text>
									</view>
									<view class="flex align-start">
										<text class="font-sm text-muted">尽享专属服务</text>
										<text @click="handleExit" class="ml-4 font-sm text-muted"
											style="cursor: pointer">退出</text>
									</view>
								</view>
							</view>
						</view>
						<view class="px-9 py-4 box border-top border-grey">
							<view class="flex flex-column justify-between" style="width: 100%">
								<view class="flex justify-center" style="width: 100%; height: 25%">
									<view class="flex justify-center align-center box" :class="'border-' + ThemeColors"
										style="
                      border-bottom-width: 5rpx;
                      border-bottom-style: solid;
                      width: 40%;
                    ">
										<text class="font font-weight-bold" :class="'text-' + ThemeColors">服务中心</text>
									</view>
									<!-- <view class="flex justify-center align-center border-white box" style="border-bottom-width:5rpx;border-bottom-style:solid; width:40%;">
										<text class="font font-weight-bold">卖家服务</text>
									</view> -->
								</view>
								<!-- 买家服务 -->
								<view class="py-4 flex justify-between" style="55%">
									<!-- 选项 -->
									<view @click="handleTabs(item.url)" v-for="(item, index) in BuyerServices"
										:key="index" style="cursor: pointer">
										<view class="flex justify-center align-center box border"
											:class="'border-' + ThemeColors" style="width: 100rpx; height: 100rpx">
											<image style="width: 60rpx; height: 60rpx" :src="item.src" mode=""></image>
										</view>
										<text class="font-sm" :class="'text-' + ThemeColors">{{
                      item.value
                    }}</text>
									</view>
								</view>
								<view class="flex QR">
									<view class="flex justify-center" style="width: 100%; height: 25%">
										<view class="flex justify-center align-center box"
											:class="'border-' + ThemeColors" style="
                        border-bottom-width: 5rpx;
                        border-bottom-style: solid;
                        width: 40%;
                      ">
											<text class="font font-weight-bold"
												:class="'text-' + ThemeColors">扫码下载</text>
										</view>
										<!-- <view class="flex justify-center align-center border-white box" style="border-bottom-width:5rpx;border-bottom-style:solid; width:40%;">
										<text class="font font-weight-bold">卖家服务</text>
									</view> -->
									</view>
									<view class="flex justify-center code py-4">
										<view class="flex justify-center w-100">
											<image src="../../static/icon/apk.png" mode="scaleToFill" />
										</view>
									</view>
								</view>
								<view class="flex justify-center align-center" style="height: 20%">
									<text @click="handleBackend" class="font-sm" :class="'text-' + ThemeColors"
										style="cursor: pointer">进入个人中心&gt;</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<a></a>
				<b></b>
				<!-- 大屏数据 -->
				<view class="flex w-100 mt-4" style="height: 1400rpx">
					<iframe height="100%" width="100%" frameborder="false"
						src="https://marketing.xiaokanglongjiang.com/dist/DigitalScreen/index.html"></iframe>
				</view>
				<!-- 今日采购 -->
				<view class="flex justify-between mt-4">
					<view class="bg-white flex flex-column" style="width: 73.5%; height: 900rpx">
						<view class="m-4" style="position: relative">
							<text class="font-lg font-weight-bold">今日采购</text>
							<text @click="handleTabs('/pages/index/purchase')" class="font-sm text-dark"
								style="cursor: pointer; position: absolute; right: 0">更多&gt;</text>
						</view>
						<view class="flex mx-4 mb-4" style="height: 100%">
							<view style="width: 20%; height: 100%; position: relative">
								<image class="bg-img" src="@/static/icon/muer1 (1).png"></image>
								<view class="pl-4" :class="'border-' + ThemeColors" style="
                    border-left-width: 10rpx;
                    border-left-style: solid;
                    position: absolute;
                    top: 100rpx;
                  ">
									<text class="font-lg" :class="'text-' + ThemeColors">木耳类</text>
								</view>
							</view>
							<view style="width: 80%; height: 100%">
								<view class="ml-2" style="width: 100%; height: 100%">
									<!-- 表头 -->
									<view class="flex justify-between align-center border-bottom border-grey"
										style="height: 10%">
										<view class="flex" style="width: 20%">
											<text class="font font-weight-bold">采购品种</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">需求量</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">收货地</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">采购方</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">报价情况</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">操作</text>
										</view>
									</view>
									<!-- 表体 -->
									<view style="height: 90%">
										<view @click="handlePurchaseDetail(item)" v-for="(item, index) in purchaseData"
											:key="index" class="table-hover flex justify-between align-center"
											style="cursor: pointer; height: 10%">
											<view class="flex" style="width: 20%">
												<text class="font text-dark text-ellipsis"
													style="width: 200rpx">{{ item.Category_Name }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">共{{ item.Residue_Quantity }}{{ item.Unit }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">{{ item.Transaction_Location }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">{{ item.Enterprise_Name }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">{{ item.Amount }}元/{{ item.Unit }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<view :id="'purchase_' + index" class="border-button px-1 view-hover"
													:class="'border-' + ThemeColors">
													<text class="font text-hover"
														:class="'text-' + ThemeColors">我要报价</text>
												</view>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 数据统计 -->
					<view class="bg-white flex flex-column" style="width: 25%; height: 900rpx">
						<!-- <view class="m-4">
							<text class="font-lg font-weight-bold">采购数据</text>
						</view>
						<view class="mx-4 mb-4" style="height: 100%">
							<view class="flex" style="height: 20%">
								<view class="flex flex-column justify-center border-right border-grey box"
									style="width: 40%; height: 100%">
									<view class="">
										<text class="font">正在询价</text>
									</view>
									<view class="">
										<text class="h2">{{ Purchase.total }}</text>
									</view>
								</view>
								<view class="pl-4 flex flex-column justify-center" style="width: 40%; height: 100%">
									<view class="">
										<text class="font">当前报价</text>
									</view>
									<view class="">
										<text class="h2">{{ Number(Purchase.Amount) }}</text>
									</view>
								</view>
							</view>
							<view class="" style="height: 80%">
								<view class="flex align-center" style="height: 10%">
									<text class="font-md">最新报价</text>
								</view>
								<view class="flex flex-column" style="height: 90%">
									<view class="flex border-bottom border-grey box" style="width: 100%; height: 15%">
										<view class="flex align-center" style="width: 33.3%">
											<text class="font">采购品种</text>
										</view>
										<view class="flex justify-center align-center" style="width: 33.3%">
											<text class="font">最新报价</text>
										</view>
										<view class="flex justify-end align-center" style="width: 33.3%">
											<text class="font">报价时间</text>
										</view>
									</view>
									<view class="flex flex-column" style="width: 100%; height: 85%">
										<view v-for="(item, index) in purchaseData" :key="index" class="flex"
											style="width: 100%; height: 10%" @click="
                        handleTabs(
                          '/pages/detail/purchase-detail?Group_Seek_Purchase_SerialNumber=' +
                            item.Group_Seek_Purchase_SerialNumber
                        )
                      ">
											<view class="flex justify-start align-center hover" style="width: 33.3%">
												<text class="font">{{ item.Category_Name }}</text>
											</view>
											<view class="flex justify-center align-center hand" style="width: 33.3%">
												<text class="font">{{ item.Amount }}元/{{ item.Unit }}</text>
											</view>
											<view class="flex justify-end align-center hand" style="width: 33.3%">
												<text class="font">{{
                          timeAgo(item.Delivery_Time)
                        }}</text>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view> -->
						<c></c>
					</view>
				</view>
				<!-- 热门供应 -->
				<view class="flex justify-between mt-4">
					<view class="bg-white flex flex-column" style="width: 73.5%; height: 900rpx">
						<view class="m-4" style="position: relative">
							<text class="font-lg font-weight-bold">热门供应</text>
							<text @click="handleTabs('/pages/index/supply')" class="font-sm text-dark"
								style="cursor: pointer; position: absolute; right: 0">更多&gt;</text>
						</view>
						<view class="flex mx-4 mb-4" style="height: 100%">
							<!-- 分类 -->
							<view style="width: 20%; height: 100%; position: relative">
								<image class="bg-img" src="@/static/icon/muer1 (2).png"></image>
								<view class="pl-4" :class="'border-' + ThemeColors" style="
                    border-left-width: 10rpx;
                    border-left-style: solid;
                    position: absolute;
                    top: 100rpx;
                  ">
									<text class="font-lg" :class="'text-' + ThemeColors">木耳类</text>
								</view>
							</view>
							<!-- 表格 -->
							<view style="width: 80%; height: 100%">
								<view class="ml-2" style="width: 100%; height: 100%">
									<!-- 表头 -->
									<view class="flex justify-between align-center border-bottom border-grey"
										style="height: 10%">
										<view class="flex" style="width: 20%">
											<text class="font font-weight-bold">销售品种</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">剩余量</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">发货地</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">销售方</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">售出情况</text>
										</view>
										<view class="flex justify-center" style="width: 20%">
											<text class="font font-weight-bold">操作</text>
										</view>
									</view>
									<!-- 表体 -->
									<view style="height: 90%">
										<view @click="handleSupplyDetail(item)" v-for="(item, index) in supplyData"
											:key="index" class="table-hover flex justify-between align-center"
											style="cursor: pointer; height: 10%">
											<view class="flex" style="width: 20%">
												<text class="font text-dark text-ellipsis"
													style="width: 200rpx">{{ item.Category_Name }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">共{{ item.Residue_Quantity }}{{ item.Unit }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">{{ item.Transaction_Location }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">{{ item.Enterprise_Name }}</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<text v-if="Number(item.Sell_Quantity) != 0"
													class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">已卖出{{ item.Sell_Quantity }}{{ item.Unit }}</text>
												<text v-else class="font text-dark text-center text-ellipsis"
													style="width: 200rpx">暂无出售记录</text>
											</view>
											<view class="flex justify-center" style="width: 20%">
												<view :id="'supply_' + index" class="border-button px-1 view-hover"
													:class="'border-' + ThemeColors">
													<text class="font text-hover"
														:class="'text-' + ThemeColors">我要采购</text>
												</view>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="bg-white flex flex-column" style="width: 25%; height: 900rpx">
						<view class="m-4">
							<text class="font-lg font-weight-bold">销售数据</text>
						</view>
						<view class="mx-4 mb-4" style="height: 100%">
							<view class="flex" style="height: 20%">
								<view class="flex flex-column justify-center border-right border-grey box"
									style="width: 40%; height: 100%">
									<view class="">
										<text class="font">正在出售</text>
									</view>
									<view class="">
										<text class="h2">{{ Supply.total }}</text>
									</view>
								</view>
								<view class="pl-4 flex flex-column justify-center" style="width: 40%; height: 100%">
									<view class="">
										<text class="font">在售金额</text>
									</view>
									<view class="">
										<text class="h2">{{ Number(Supply.Amount) }}</text>
									</view>
								</view>
							</view>
							<view class="" style="height: 80%">
								<view class="flex align-center" style="height: 10%">
									<text class="font-md">最新上架</text>
								</view>
								<view class="flex flex-column" style="height: 90%">
									<view class="flex border-bottom border-grey box" style="width: 100%; height: 15%">
										<view class="flex align-center" style="width: 33.3%">
											<text class="font">销售品种</text>
										</view>
										<view class="flex justify-center align-center" style="width: 33.3%">
											<text class="font">销售价格</text>
										</view>
										<view class="flex justify-end align-center" style="width: 33.3%">
											<text class="font">上架时间</text>
										</view>
									</view>
									<view class="flex flex-column" style="width: 100%; height: 85%">
										<view v-for="(item, index) in supplyData" :key="index" class="flex"
											style="width: 100%; height: 10%" @click="
                        handleTabs(
                          '/pages/detail/supply-detail?id=' +
                            item.Group_Purchasing_SerialNumber
                        )
                      ">
											<view class="flex justify-start align-center hover" style="width: 33.3%">
												<text class="font">{{
                          item.Category_Name
                        }}</text>
											</view>
											<view class="flex justify-center align-center hand" style="width: 33.3%">
												<text class="font">{{ item.Amount }}元/{{ item.Unit }}</text>
											</view>
											<view class="flex justify-end align-center hand" style="width: 33.3%">
												<text class="font">{{
                          timeAgo(item.Delivery_Time)
                        }}</text>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 好货推荐 -->
				<view class="mt-4 p-4 bg-white">
					<view class="pb-4">
						<text class="font-lg font-weight-bold">好货推荐</text>
					</view>
					<view class="flex" style="height: 600rpx">
						<view @click="GoodDetail(item)" v-for="(item, index) in Goods" :key="index"
							:class="index == Goods.length - 1 ? '' : 'mr-4'"
							class="rounded flex flex-column p-4 border box border-grey goodshover"
							style="width: 18.5%; position: relative">
							<view style="width: 100%; height: 60%">
								<image class="rounded" style="width: 100%; height: 100%"
									:src="Domain_IMG + item.Picture_URL" mode=""></image>
							</view>
							<view class="flex flex-column justify-between" style="width: 100%; height: 40%">
								<view class="flex justify-between align-end" style="height: 30%">
									<view>
										<text class="font-lg font-weight-bold"
											:class="'text-' + ThemeColors">{{ item.Sales_Unit_Price }}</text>
										<text class="font-sm" :class="'text-' + ThemeColors">元/盒</text>
									</view>
									<view>
										<!-- <text class="font-sm text-muted">成交976元</text> -->
										<text class="font-sm text-muted">剩余{{ item.Stock_Remain }}</text>
									</view>
								</view>
								<view class="flex flex-column">
									<text
										class="font text-ellipsis-2">{{ item.Article_Name }}({{ item.Category_Name }})</text>
								</view>
								<view class="flex flex-column">
									<text
										class="font-sm text-muted text-ellipsis">所属企业:{{ item.Enterprise_Name }}</text>
								</view>
								<view class="flex align-center text-ellipsis" style="width: 100%; height: 30%">
									<view class="mr-2 flex align-center px-1 rounded border box"
										:class="'border-' + ThemeColors" style="height: 80%">
										<text class="font-sm" :class="'text-' + ThemeColors">{{
                      item.Category_Name
                    }}</text>
									</view>
									<!-- <view class="mr-2 flex align-center px-1 rounded border box" :class="'border-'+ThemeColors" style="height: 80%;">
										<text class="font-sm" :class="'text-'+ThemeColors">假货必陪</text>
									</view>
									<view class="mr-2 flex align-center px-1 rounded border box" :class="'border-'+ThemeColors" style="height: 80%;">
										<text class="font-sm" :class="'text-'+ThemeColors">破损补发</text>
									</view>
									<view class="mr-2 flex align-center px-1 rounded border box" :class="'border-'+ThemeColors" style="height: 80%;">
										<text class="font-sm" :class="'text-'+ThemeColors">保证金1000元</text>
									</view> -->
								</view>
							</view>
							<!-- 认证标签 -->
							<view v-if="index == 0 || index == 1" class="rounded px-2 py-1" :class="'bg-' + ThemeColors"
								style="position: absolute; top: 0; left: 0">
								<text class="font text-white">认证商家</text>
							</view>
						</view>
					</view>
				</view>
				<!-- 行情资讯 -->
				<view class="mt-4 p-4 bg-white">
					<view class="pb-4">
						<text class="font-lg font-weight-bold">最新资讯</text>
					</view>
					<view class="flex">
						<view class="mr-3 border border-grey w-100" style="box-sizing: border-box">
							<view class="bg-lightbrown" style="height: 80rpx; position: relative">
								<view class="bg-white flex align-center justify-center border-top"
									:class="'border-' + ThemeColors" style="
                    border-top-width: 5rpx;
                    box-sizing: border-box;
                    height: 100%;
                    width: 168rpx;
                  ">
									<text class="font-md">国内资讯</text>
								</view>
								<text class="hover flex align-center font-sm text-muted" style="
                    height: 80rpx;
                    position: absolute;
                    top: 0;
                    right: 20rpx;
                  " @click="goNews()">更多></text>
							</view>
							<!-- 内容 -->
							<view class="flex w-100" style="height: 100%">
								<view class="mx-2 w-100" style="height: 500rpx">
									<view @click="
                      goNewsDetail(
                        '/pages/index/news?id=' + item.News_SerialNumber
                      )
                    " @mouseleave="mouseleave(item.News_SerialNumber)" @mouseenter="mouseenter(item.News_SerialNumber)"
										v-for="(item, index) in Domestic_list.slice(0, 5)" :key="index"
										class="flex align-center w-100 border-bottom border-grey hover" style="
                      position: relative;
                      border-bottom-style: dashed;
                      box-sizing: border-box;
                      height: 100rpx;
                    " :style="active == item.News_SerialNumber ? hover : ''"
										:class="active == item.News_SerialNumber ? hovers : ''">
										<view class="flex align-center justify-center"
											:class="index < 3 ? 'bg-' + ThemeColors : 'bg-grey'"
											style="width: 32rpx; height: 32rpx">
											<text class="font text-white">{{ index + 1 }}</text>
										</view>
										<text class="ml-2 font text-ellipsis" style="width: 70%">{{
                      item.News_Name
                    }}</text>
										<text class="font-sm text-muted"
											style="position: absolute; right: 0">{{ item.News_Time }}</text>
									</view>
								</view>
							</view>
						</view>
						<view class="mr-3 border border-grey w-100" style="box-sizing: border-box">
							<view class="bg-lightbrown" style="height: 80rpx; position: relative">
								<view class="bg-white flex align-center justify-center border-top"
									:class="'border-' + ThemeColors" style="
                    border-top-width: 5rpx;
                    box-sizing: border-box;
                    height: 100%;
                    width: 168rpx;
                  ">
									<text class="font-md">国际资讯</text>
								</view>
								<text @click="goNews()" class="hover flex align-center font-sm text-muted" style="
                    height: 80rpx;
                    position: absolute;
                    top: 0;
                    right: 20rpx;
                  ">更多></text>
							</view>
							<!-- 内容 -->
							<view class="flex w-100" style="height: 100%">
								<view class="mx-2 w-100" style="height: 500rpx">
									<view @click="
                      goNewsDetail(
                        '/pages/index/news?id=' + item.News_SerialNumber
                      )
                    " @mouseleave="mouseleave(item.News_SerialNumber)" @mouseenter="mouseenter(item.News_SerialNumber)"
										v-for="(item, index) in International_list.slice(0, 5)" :key="index"
										class="flex align-center w-100 border-bottom border-grey hover" style="
                      position: relative;
                      border-bottom-style: dashed;
                      box-sizing: border-box;
                      height: 100rpx;
                    " :style="active == item.News_SerialNumber ? hover : ''"
										:class="active == item.News_SerialNumber ? hovers : ''">
										<view class="flex align-center justify-center"
											:class="index < 3 ? 'bg-' + ThemeColors : 'bg-grey'"
											style="width: 32rpx; height: 32rpx">
											<text class="font text-white">{{ index + 1 }}</text>
										</view>
										<text class="ml-2 font text-ellipsis" style="width: 70%">{{
                      item.News_Name
                    }}</text>
										<text class="font-sm text-muted"
											style="position: absolute; right: 0">{{ item.News_Time }}</text>
									</view>
								</view>
							</view>
						</view>
						<view class="border border-grey w-100" style="box-sizing: border-box">
							<view class="bg-lightbrown" style="height: 80rpx; position: relative">
								<view class="bg-white flex align-center justify-center border-top"
									:class="'border-' + ThemeColors" style="
                    border-top-width: 5rpx;
                    box-sizing: border-box;
                    height: 100%;
                    width: 168rpx;
                  ">
									<text class="font-md">公司动态</text>
								</view>
								<text @click="goNews()" class="hover flex align-center font-sm text-muted" style="
                    height: 80rpx;
                    position: absolute;
                    top: 0;
                    right: 20rpx;
                  ">更多></text>
							</view>
							<!-- 内容 -->
							<view class="flex w-100" style="height: 100%">
								<view class="mx-2 w-100" style="height: 500rpx">
									<view @click="
                      goNewsDetail(
                        '/pages/index/news?id=' + item.News_SerialNumber
                      )
                    " @mouseleave="mouseleave(item.News_SerialNumber)" @mouseenter="mouseenter(item.News_SerialNumber)"
										v-for="(item, index) in CompanyDynamicsc_list" :key="index"
										class="flex align-center w-100 border-bottom border-grey hover" style="
                      position: relative;
                      border-bottom-style: dashed;
                      box-sizing: border-box;
                      height: 100rpx;
                    " :style="active == item.News_SerialNumber ? hover : ''"
										:class="active == item.News_SerialNumber ? hovers : ''">
										<view class="flex align-center justify-center"
											:class="index < 3 ? 'bg-' + ThemeColors : 'bg-grey'"
											style="width: 32rpx; height: 32rpx">
											<text class="font text-white">{{ index + 1 }}</text>
										</view>
										<text class="ml-2 font text-ellipsis" style="width: 70%">{{
                      item.News_Name
                    }}</text>
										<text class="font-sm text-muted"
											style="position: absolute; right: 0">{{ item.News_Time }}</text>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 移动端 -->
		<view v-else-if="screenWidth <= 480" class="bg-grey py-2">
			<!-- 轮播图 -->
			<view class="mx-2 mb-2">
				<swiperDot v-if="swipers.length > 0" class="position-relative" :current="current" :info="swipers">
					<swiper :autoplay="true" :interval="3000" :duration="500" circular style="height: 300rpx"
						@change="changeIndicatorDots">
						<swiper-item v-for="(item, index) in swipers" :key="index">
							<image :src="Domain_IMG + item.Picture_URL" mode="sapectFill"
								style="height: 300rpx; width: 100%"></image>
						</swiper-item>
					</swiper>
				</swiperDot>
			</view>
			<!-- 指数 -->
			<view class="px-2 mb-2 flex flex-column">
				<!-- 价格指数 -->
				<view class="bg-white flex flex-column mb-2" style="height: 360rpx; width: 100%">
					<view class="px-4 my-1">
						<text class="font font-weight-bold">价格指数</text>
					</view>
					<view class="box border-top border-grey" style="height: 100%; width: 100%">
						<view style="width: 100%; height: 280rpx">
							<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
						</view>
					</view>
				</view>
				<!-- 物流指数 -->
				<view class="bg-white flex flex-column mb-2" style="height: 360rpx; width: 100%">
					<view class="px-4 my-1">
						<text class="font font-weight-bold">物流指数</text>
					</view>
					<view class="box border-top border-grey" style="height: 100%; width: 100%">
						<view style="width: 100%; height: 280rpx">
							<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
						</view>
					</view>
				</view>
				<!-- 库存指数 -->
				<view class="bg-white flex flex-column mb-2" style="height: 360rpx; width: 100%">
					<view class="px-4 my-1">
						<text class="font font-weight-bold">库存指数</text>
					</view>
					<view class="box border-top border-grey" style="height: 100%; width: 100%">
						<view style="width: 100%; height: 280rpx">
							<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
						</view>
					</view>
				</view>
				<view class="p-4 bg-white box border-top border-grey" style="height: 40%">
					<view style="height: 10%; position: relative"><strong></strong>
						<text class="font font-weight-bold ;">溯源信息</text>
						<text @click="handleTabs('/pages/index/enterprise')" class="font-sm text-dark"
							style="cursor: pointer; position: absolute; right: 0">更多&gt;</text>
					</view>
					<view style="width: 100%; height: 90%">
						<view class="flex justify-center align-center border-bottom border-grey box"
							style="height: 40%">
							<text class="font-md">已完成溯源认证企业
								<text class="h3 font-weight-bold" :class="'text-' + ThemeColors">100</text>
								个</text>
						</view>
						<!-- 溯源信息 -->
						<view style="height: 60%">
							<view class="flex align-center" style="height: 20%">
								<view style="width: 40%">
									<text class="font font-weight-bold">企业名称</text>
								</view>
								<view class="flex justify-end" style="width: 60%">
									<text class="font font-weight-bold">------</text>
								</view>
							</view>
							<view class="w-100">
								<view v-for="i in 5" :key="i" class="flex align-center" style="height: 20%">
									<view class="flex justify-center" style="width: 30%">
										<text class="font-sm text-ellipsis">黑龙江名字太长企业</text>
									</view>
									<view class="flex justify-end" style="width: 70%">
										<text class="font-sm text-ellipsis">于21分钟前完成溯源认证</text>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 今日采购 -->
			<view class="px-2 mb-2">
				<view class="bg-white flex flex-column" style="width: 100%; height: 900rpx">
					<view class="m-2" style="position: relative">
						<text class="font-lg font-weight-bold">今日采购</text>
						<text @click="handleTabs('/pages/index/purchase')" class="font-sm text-dark"
							style="cursor: pointer; position: absolute; right: 0">更多&gt;</text>
					</view>
					<view class="flex mx-2 mb-4" style="height: 100%">
						<view class="boxshadow1" style="width: 100%; height: 100%; overflow-x: scroll">
							<!-- 表头 -->
							<view class="flex border-bottom border-grey" style="width: 1080rpx; height: 10%">
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">采购品种</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">采购量</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">收货地</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">采购方</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">报价情况</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">操作</text>
								</view>
							</view>
							<!-- 表体 -->
							<view style="height: 90%">
								<view @click="handlePurchaseDetail(item)" v-for="(item, index) in purchaseData"
									:key="index" class="table-hover flex justify-between align-center"
									style="width: 1080rpx; cursor: pointer; height: 10%">
									<view class="flex align-center justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">{{ item.Article_Name }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">共{{ item.Residue_Quantity }}{{ item.Unit }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">{{ item.Transaction_Location }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">{{ item.Enterprise_Name }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">{{ item.Amount }}元/{{ item.Unit }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<view :id="'purchase_' + index" class="border-button px-1"
											:class="'border-' + ThemeColors">
											<text class="font text-hover" :class="'text-' + ThemeColors"
												style="width: 180rpx">我要报价</text>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 采购数据 -->
			<view class="px-2 mb-2">
				<view class="bg-white flex flex-column" style="width: 100%; height: 900rpx">
					<view class="m-4">
						<text class="font-lg font-weight-bold">采购数据</text>
					</view>
					<view class="mx-4 mb-4" style="height: 100%">
						<view class="flex" style="height: 20%">
							<view class="flex flex-column justify-center border-right border-grey box"
								style="width: 40%; height: 100%">
								<view class="">
									<text class="font">正在询价</text>
								</view>
								<view class="">
									<text class="h2">9807</text>
								</view>
							</view>
							<view class="pl-4 flex flex-column justify-center" style="width: 40%; height: 100%">
								<view class="">
									<text class="font">当前报价</text>
								</view>
								<view class="">
									<text class="h2">54833</text>
								</view>
							</view>
						</view>
						<view class="" style="height: 80%">
							<view class="flex align-center" style="height: 10%">
								<text class="font-md">最新报价</text>
							</view>
							<view class="flex flex-column" style="height: 90%">
								<view class="flex border-bottom border-grey box" style="width: 100%; height: 15%">
									<view class="flex align-center" style="width: 33.3%">
										<text class="font">采购品种</text>
									</view>
									<view class="flex justify-center align-center" style="width: 33.3%">
										<text class="font">最新报价</text>
									</view>
									<view class="flex justify-end align-center" style="width: 33.3%">
										<text class="font">报价时间</text>
									</view>
								</view>
								<view class="flex flex-column justify-between" style="width: 100%; height: 85%">
									<view v-for="i in 8" :key="i" class="flex" style="width: 100%; height: 10%">
										<view class="flex justify-start align-center" style="width: 33.3%">
											<text class="font">黑木耳</text>
										</view>
										<view class="flex justify-center align-center" style="width: 33.3%">
											<text class="font">1800元/吨</text>
										</view>
										<view class="flex justify-end align-center" style="width: 33.3%">
											<text class="font">1分钟前</text>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 热门供应 -->
			<view class="px-2 mb-2">
				<view class="bg-white flex flex-column" style="width: 100%; height: 900rpx">
					<view class="m-2" style="position: relative">
						<text class="font-lg font-weight-bold">热门供应</text>
						<text @click="handleTabs('/pages/index/purchase')" class="font-sm text-dark"
							style="cursor: pointer; position: absolute; right: 0">更多&gt;</text>
					</view>
					<view class="flex mx-2 mb-4" style="height: 100%">
						<view class="boxshadow1" style="width: 100%; height: 100%; overflow-x: scroll">
							<!-- 表头 -->
							<view class="flex border-bottom border-grey" style="width: 1080rpx; height: 10%">
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">销售品种</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">销售量</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">发货地</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">销售方</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">销售情况</text>
								</view>
								<view class="flex align-center justify-center" style="width: 180rpx">
									<text class="font font-weight-bold">操作</text>
								</view>
							</view>
							<!-- 表体 -->
							<view style="height: 90%">
								<view @click="handlePurchaseDetail(item)" v-for="(item, index) in supplyData"
									:key="index" class="table-hover flex justify-between align-center"
									style="width: 1080rpx; cursor: pointer; height: 10%">
									<view class="flex align-center justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">{{ item.Group_Purchasing_Name }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">共{{ item.Residue_Quantity }}{{ item.Unit }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">/</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">{{ item.Enterprise_Name }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<text class="font text-dark text-center text-ellipsis"
											style="width: 180rpx">已卖出{{ item.Sell_Quantity }}{{ item.Unit }}</text>
									</view>
									<view class="flex justify-center" style="width: 180rpx">
										<view :id="'purchase_' + index" class="border-button px-1"
											:class="'border-' + ThemeColors">
											<text class="font text-hover" :class="'text-' + ThemeColors"
												style="width: 180rpx">我要采购</text>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 销售数据 -->
			<view class="px-2 mb-2">
				<view class="bg-white flex flex-column" style="width: 100%; height: 900rpx">
					<view class="m-4">
						<text class="font-lg font-weight-bold">销售数据</text>
					</view>
					<view class="mx-4 mb-4" style="height: 100%">
						<view class="flex" style="height: 20%">
							<view class="flex flex-column justify-center border-right border-grey box"
								style="width: 40%; height: 100%">
								<view class="">
									<text class="font">正在出售</text>
								</view>
								<view class="">
									<text class="h2">9007</text>
								</view>
							</view>
							<view class="pl-4 flex flex-column justify-center" style="width: 40%; height: 100%">
								<view class="">
									<text class="font">已售金额</text>
								</view>
								<view class="">
									<text class="h2">54833</text>
								</view>
							</view>
						</view>
						<view class="" style="height: 80%">
							<view class="flex align-center" style="height: 10%">
								<text class="font-md">最新上架</text>
							</view>
							<view class="flex flex-column" style="height: 90%">
								<view class="flex border-bottom border-grey box" style="width: 100%; height: 15%">
									<view class="flex align-center" style="width: 33.3%">
										<text class="font">销售品种</text>
									</view>
									<view class="flex justify-center align-center" style="width: 33.3%">
										<text class="font">销售价格</text>
									</view>
									<view class="flex justify-end align-center" style="width: 33.3%">
										<text class="font">上架时间</text>
									</view>
								</view>
								<view class="flex flex-column justify-between" style="width: 100%; height: 85%">
									<view v-for="i in 8" :key="i" class="flex" style="width: 100%; height: 10%">
										<view class="flex justify-start align-center" style="width: 33.3%">
											<text class="font">黑木耳</text>
										</view>
										<view class="flex justify-center align-center" style="width: 33.3%">
											<text class="font">1800元/吨</text>
										</view>
										<view class="flex justify-end align-center" style="width: 33.3%">
											<text class="font">1分钟前</text>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 好货推荐 -->
			<view class="px-2 mb-2">
				<view class="mt-4 p-4 bg-white">
					<view class="pb-4">
						<text class="font-lg font-weight-bold">好货推荐</text>
					</view>
					<view class="flex flex-wrap justify-between">
						<view v-for="(item, index) in Goods" :key="index"
							class="mb-2 rounded p-2 border box border-grey" style="width: 49%; position: relative">
							<view style="width: 100%; height: 250rpx">
								<image style="width: 100%; height: 100%" :src="Domain_IMG + item.Picture_URL" mode="">
								</image>
							</view>
							<view class="flex flex-column justify-between" style="width: 100%">
								<view class="flex flex-column">
									<view>
										<text class="font" :class="'text-' + ThemeColors">{{
                      item.Sales_Unit_Price
                    }}</text>
										<text class="font-sm" :class="'text-' + ThemeColors">元/盒</text>
									</view>
									<view>
										<!-- <text class="font-sm text-muted">成交976元</text> -->
										<text class="font-sm text-muted">剩余{{ item.Stock_Remain }}</text>
									</view>
								</view>
								<view class="flex">
									<text class="font text-ellipsis-2">{{
                    item.Article_Name
                  }}</text>
								</view>
								<view class="flex text-ellipsis" style="width: 100%">
									<!-- <view class="mr-2 px-1 rounded border box" :class="'border-'+ThemeColors" style="width: 120rpx; height: 50rpx;">
										<text class="font-sm" :class="'text-'+ThemeColors">假货必陪</text>
									</view>
									<view class="mr-2 flex align-center px-1 rounded border box" :class="'border-'+ThemeColors" style="width: 120rpx; height: 50rpx;">
										<text class="font-sm" :class="'text-'+ThemeColors">破损补发</text>
									</view>
									<view class="mr-2 flex align-center px-1 rounded border box" :class="'border-'+ThemeColors" style="width: 120rpx; height: 50rpx;">
										<text class="font-sm" :class="'text-'+ThemeColors">保证金1000元</text>
									</view> -->
								</view>
							</view>
							<!-- 认证标签 -->
							<view v-if="index == 0 || index == 1" class="rounded px-2 py-1" :class="'bg-' + ThemeColors"
								style="position: absolute; top: 0; left: 0">
								<text class="font text-white">认证商家</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 行情咨询 -->
			<view class="px-2 mb-2">
				<view class="mt-4 p-4 bg-white">
					<view class="pb-4">
						<text class="font-lg font-weight-bold">行情资讯</text>
					</view>
					<view class="" style="width: 100%; height: 100%">
						<swiperDot class="position-relative" :current="newCurrent" :info="newSwipers">
							<swiper :autoplay="true" :interval="3000" :duration="500" easing-function="easeInOutCubic"
								circular style="height: 400rpx" @change="changeIndicatorNews">
								<swiper-item v-for="(item, index) in newSwipers" :key="index">
									<image :src="item.src" mode="sapectFill" style="height: 400rpx; width: 100%">
									</image>
								</swiper-item>
							</swiper>
						</swiperDot>
					</view>
					<view class="my-2 flex flex-column" style="width: 100%">
						<view class="pl-2" :class="'border-' + ThemeColors" style="
                width: 100%;
                height: 5%;
                border-left-width: 10rpx;
                border-left-style: solid;
              ">
							<text class="font font-weight-bold">热门推荐</text>
						</view>
						<view style="width: 95%">
							<view v-for="i in 10" :key="i" class="flex align-center" style="height: 50rpx">
								<view class="line flex-shrink" :class="'bg-' + ThemeColors"></view>
								<view class="flex" style="width: 100%">
									<text class="font text-ellipsis"
										:class="i == 1 ? 'font-weight-bold' : ''">北货郎，土生土长在山旁，采山珍，卖山货，辛辛苦苦为家忙......这段小小的顺口溜既是我们北货郎品牌的来源，也是当今新林农山货人的真实写照</text>
								</view>
							</view>
						</view>
					</view>
					<view class="my-2 flex flex-column" style="width: 100%">
						<view class="pl-2" :class="'border-' + ThemeColors" style="
                width: 100%;
                height: 5%;
                border-left-width: 10rpx;
                border-left-style: solid;
              ">
							<text class="font font-weight-bold">最新咨询</text>
						</view>
						<view style="width: 95%">
							<view v-for="i in 10" :key="i" class="flex align-center" style="height: 50rpx">
								<view class="line flex-shrink" :class="'bg-' + ThemeColors"></view>
								<view class="flex" style="width: 100%">
									<text class="font text-ellipsis"
										:class="i == 1 ? 'font-weight-bold' : ''">黑龙江省江永农村直播电商案例入选全国农村直播电商优秀案例</text>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 底部 -->
		<yFooter Show v-if="screenWidth > 480" :screenWidth="screenWidth"></yFooter>
	</view>
</template>

<script>
	const app = getApp();
	import {
		Message
	} from "element-ui";
	import yHeader from "@/components/yHeader.vue";
	import yFooter from "@/components/yFooter.vue";
	import swiperDot from "@/components/swiper-doc.vue";
	import a from "./indexdetail/a.vue";
	import b from "./indexdetail/b.vue";
	import c from "./indexdetail/c.vue";
	import {
		GroupSeekProcureAll,
		GroupSeekProcureAllAction,
		GroupProcureAll,
		GroupProcureAllAction,
		GroupProcureStatistics,
		GroupGoodsAll,
	} from "@/api/group.js";
	import {
		GoodsFileInquiry
	} from "@/api/global.js";
	import {
		getTraceability
	} from "@/api/traceability.js";
	import {
		NewsAll
	} from "@/api/information.js";
	export default {
		components: {
			yHeader,
			yFooter,
			swiperDot, //轮播图组件
			a,
			b,
			c,
		},
		data() {
			return {
				bg_white: "bg-white",
				isLogin: false,
				active: -1,
				Phone: "",
				Name: "",
				Domain_IMG: app.globalData.Domain_IMG,
				screenWidth: uni.getSystemInfoSync().windowWidth,
				ThemeColors: app.globalData.ThemeColors,
				current: 0, // 标识当前选中的图片序列号
				BuyerServices: [{
						value: "交易服务",
						hover: false,
						src: "../../static/icon/order-success.png",
						url: "/pages/backend/index?id=6",
					},
					{
						value: "金融服务",
						hover: false,
						src: "../../static/icon/finance-success.png",
						url: "/pages/index/financial",
					},
					{
						value: "其他服务",
						hover: false,
						src: "../../static/icon/4-01.png",
						url: "/pages/backend/index",
					},
				],
				swipers: [{
					Picture_URL: 'foust1.jpg',
				}, {
					Picture_URL: 'foust2.jpg',
				}, {
					Picture_URL: 'foust4.jpg',
				}, {
					Picture_URL: 'foust3.jpg',
				}],
				supplyForm: {
					Article_Name: "",
					Category_SerialNumber: "",
					Enterprise_Info_SerialNumber: "",
					Type: "0",
					page: 1, //页数
					limit: 10, //每页数据条数
				},
				purchaseform: {
					Article_Name: "",
					Category_SerialNumber: "",
					Enterprise_Info_SerialNumber: "",
					Type: "0",
					token: "",
					page: 1, //页数
					limit: 10, //每页数据条数
				},
				supplyData: [],
				purchaseData: [],
				Goods: [],
				traceability: {
					total: 0,
				},
				Supply: {},
				Purchase: {},
				hover: "",
				hovers: "",
				International_list: [],
				Domestic_list: [],
				CompanyDynamicsc_list: [],
				form: {
					News_Type: "1", //type 默认空是全部
					Row_Status: "", //状态
					page: 1, //页数
					limit: 5, //每页数据条数
				},
			};
		},
		onLoad() {
			if (uni.getStorageSync("loginInfo").token) {
				//本地存储地址
				this.isLogin = true;
				this.Phone = uni.getStorageSync("loginInfo").use.slice(7, 11);
				this.Name = uni.getStorageSync("loginInfo").username;
			} else {
				this.isLogin = false;
			}
			this.getData(this.supplyForm, this.purchaseform);
		},
		computed: {
			timeAgo() {
				return function(date) {
					const seconds = Math.floor((new Date() - new Date(date)) / 1000);
					const intervals = {
						年: 31536000,
						月: 2592000,
						周: 604800,
						天: 86400,
						小时: 3600,
						分钟: 60,
						秒: 1,
					};
					for (let interval in intervals) {
						const count = Math.floor(seconds / intervals[interval]);
						if (count > 0) {
							return count + " " + interval + "前";
						}
					}
					return "刚刚";
				};
			},
		},
		created() {
			this.Domestic("2");
			this.international("3");
			this.CompanyDynamics("4");
		},
		methods: {
			async CompanyDynamics(i) {
				this.form.News_Type = i;
				const res = await NewsAll({
					data: this.form,
				});
				this.CompanyDynamicsc_list = res.tableData;
			},
			async Domestic(i) {
				this.form.News_Type = i;
				const res = await NewsAll({
					data: this.form,
				});
				this.Domestic_list = res.tableData;
			},
			async international(i) {
				this.form.News_Type = i;
				const res = await NewsAll({
					data: this.form,
				});
				this.International_list = res.tableData;
			},
			async getData(supplyForm, purchaseform) {
				//寄售
				const res1 = await GroupProcureAllAction({
					data: supplyForm,
				});
				if (res1.redirect && res1.redirect == "REDIRECT") {
					uni.removeStorageSync("loginInfo");
					const res1 = await GroupProcureAll({
						data: supplyForm,
					});
					if (res1.Status == "success") {
						this.supplyData = res1.tableData;
					}
				} else if (res1.Status == "success") {
					this.supplyData = res1.tableData;
				}
				//招采
				const res2 = await GroupSeekProcureAllAction({
					data: purchaseform,
				});
				if (res2.redirect && res2.redirect == "REDIRECT") {
					uni.removeStorageSync("loginInfo");
					const res2 = await GroupSeekProcureAll({
						data: purchaseform,
					});
					if (res2.Status == "success") {
						this.purchaseData = res2.tableData;
					}
				} else if (res2.Status == "success") {
					this.purchaseData = res2.tableData;
				}
				//溯源
				const res3 = await getTraceability({
					data: {},
				});
				if (res3.redirect && res3.redirect == "REDIRECT") {
					uni.removeStorageSync("loginInfo");
				} else if (res3.Status == "success") {
					this.traceability.total = res3.total;
				}
				//统计
				const res4 = await GroupProcureStatistics({
					data: {},
				});
				if (res4.redirect && res4.redirect == "REDIRECT") {
					uni.removeStorageSync("loginInfo");
				} else if (res4.Status == "success") {
					this.Supply = res4.Supply;
					this.Purchase = res4.Purchase;
				}
				//轮播图
				const res5 = await GoodsFileInquiry({
					data: {
						Data: "group_rotation_pic",
					},
				});
				// this.swipers = res5;
				// console.log(res5);
				//普通商品
				const res6 = await GroupGoodsAll({
					data: {
						Article_Name: "",
						page: 1,
						limit: 8,
						Category_SerialNumber: "",
						sort: 0,
					},
				});
				this.Goods = res6.tableData;
			},
			handleTabs(url) {
				if (
					url == "/pages/backend/index" &&
					uni.getStorageSync("loginInfo") == ""
				) {
					Message({
						type: "warning",
						message: "登录后可享受全部服务",
					});
					let time = setTimeout(() => {
						uni.navigateTo({
							url: "/pages/login/login",
						});
						clearTimeout(time);
					}, 2000);
					return;
				}
				uni.navigateTo({
					url,
				});
			},
			Login() {
				//登录
				uni.navigateTo({
					url: "/pages/login/login",
				});
			},
			handleSkip(url) {
				if (url == "baselarge/index.html") {
					window.location.href =
						"https://digital.essc.top/dist/h5Test/baselarge/index.html";
				}
			},
			handleExit() {
				//退出
				uni.removeStorageSync("loginInfo");
				this.isLogin = false;
				this.getData(this.supplyForm, this.purchaseform);
				window.history.go(0);
			},
			handleBackend() {
				//进入卖家中心
				if (uni.getStorageSync("loginInfo").token) {
					uni.navigateTo({
						url: "/pages/backend/index",
					});
				} else {
					Message({
						type: "error",
						message: "请先登录",
					});
					uni.removeStorageSync("loginInfo");
				}
			},
			changeIndicatorDots(e) {
				//每次轮播修改轮播图数
				this.current = e.detail.current;
			},
			handlePurchaseDetail(row) {
				//跳转详情页
				uni.navigateTo({
					url: "/pages/detail/purchase-detail?Group_Seek_Purchase_SerialNumber=" +
						row.Group_Seek_Purchase_SerialNumber,
				});
			},
			handleSupplyDetail(row) {
				//跳转详情页
				uni.navigateTo({
					url: "/pages/detail/supply-detail?id=" + row.Group_Purchasing_SerialNumber,
				});
			},
			godetail() {
				//跳转到详情页
				uni.navigateTo({
					url: "/pages/detail/purchase-detail",
				});
			},
			goNews() {
				uni.navigateTo({
					url: "/pages/index/consult",
				});
			},
			goNewsDetail(url) {
				this.hover = "";
				this.hovers = "";
				uni.navigateTo({
					url,
				});
			},
			mouseenter(i) {
				this.active = i;
				this.hover = "text-decoration: underline;";
				this.hovers = "text-" + this.ThemeColors;
			},
			mouseleave(i) {
				this.active = -1;
			},
			Register() {
				uni.navigateTo({
					url: "/pages/login/register",
				});
			},
			GoodDetail(item) {
				sessionStorage.setItem("Article_SerialNumber", item.Article_SerialNumber);
				sessionStorage.setItem(
					"Sales_Unit_Price_SerialNumber",
					item.Sales_Unit_Price_SerialNumber
				);
				sessionStorage.setItem("Store_SerialNumber", item.Store_SerialNumber);
				uni.navigateTo({
					url: "/pages/index/goodsdetail",
				});
			},
		},
	};
</script>

<style scoped lang="scss">
	.box {
		box-sizing: border-box;
	}

	.border-button {
		border-width: 5rpx;
		border-style: solid;
		box-sizing: border-box;
	}

	.bg-img {
		position: absolute;
		width: 100%;
		height: 200rpx;
		bottom: 0;
	}

	.line {
		height: 8rpx;
		width: 8rpx;
		margin-right: 11px;
	}

	.table-hover:hover .text-hover {
		color: white;
	}

	.table-hover:hover .view-hover {
		background-color: #28a745;
	}

	.boxshadow1 {
		box-shadow: inset -15px 0px 15px -20px #000;
	}

	.hover {
		cursor: pointer;
	}

	.hover :hover {
		color: #28a745;
	}

	.hand {
		cursor: pointer;
	}

	.goodshover {
		cursor: pointer;
	}

	.goodshover:hover {
		box-shadow: 0 0 5rpx rgba(0, 0, 0, 0.3);
		transform: translateY(-5rpx);
		transition: 0.5s;
	}

	.QR {
		//   justify-content: space-between;
		flex-direction: column;

		.code {
			justify-content: space-between;
		}

		view {
			image {
				width: 120rpx;
				height: 120rpx;
			}
		}
	}
</style>